using System;
using System.Collections.Generic;
using System.Text;
using SwinMessengerLibrary;

namespace SwinMessengerConsoleApp
{
    class SwinMessengerCommand
    {
        /// <summary>
        /// this is a command in the SwinMessengerConsoleApp
        /// </summary>
        /// <param name="ids">the identifiers of the command</param>
        public SwinMessengerCommand(string[] ids)
        {
            _Identifiers = ids;
        }
        private string[] _Identifiers;

        /// <summary>
        /// This checks to see if the command is the command that you are looking for
        /// </summary>
        /// <param name="identifier">the command that is beening looked for</param>
        /// <returns>returns true if it is the command</returns>
        public bool AreYou(string identifier)
        {
            foreach (string anIdentifier in _Identifiers)
            {
                if (identifier.ToUpper() == anIdentifier.ToUpper())
                {
                    return true;
                }
            }
            return false;
        }
        /// <summary>
        /// This is the where the commands execute the command
        /// </summary>
        /// <param name="runOn">the server to execute the command on</param>
        /// <param name="parameters">the parrameters of the command</param>
        /// <returns>what will get printed to the screen</returns>
        public virtual List<string> Execute(Server runOn, string[] parameters)
        {
            return null;
        }
    }
}
